package com.test;

public class Ex1231_04_pro {
	int hap;
/*	
	public void sum(int...arr){
		hap=0;
		for (int i : arr) {
			this.hap = hap + i;
		}
	}
*/
	public void sum(int s){
		hap=0;
		for (int i = 0; i < s; i++) {
			this.hap = hap + i;		
		}
	}
	
	
	
	

	public String toString(){
		return "sum:"+this.hap;
	}
	
}
